home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-04 / 422mods.zip / TST001.422 < prev    next >
Text File  |  1993-03-03  |  7KB  |  194 lines

  1. Sound Blaster Chat mod
  2. Saint #13 @27458
  3. Mon Feb 22 21:05:00 1993
  4. ┌────────────────────────────────────────────────────────────────────────────┐
  5. │ Mod Name:    :  TST001.MOD          Author :  The Saint                    │
  6. │ Difficulty   :  basic block read    Update :  none                         │
  7. │ WWIV Version :  4.22                Date   :  02/21/93                     │
  8. │ Files Modded :  BBSUTL.C BBS.C                                             │
  9. │                  Optionally VARDEC.H                                       │
  10. │ Description  :  a nice sound blaster chat mod for those of you who want it │
  11. │                                                                            │
  12. └────────────────────────────────────────────────────────────────────────────┘
  13.  
  14.   The reason I'm doing this is 'cause I wanted one and couldn't find one 
  15.   which would do what I wanted, so I coded this up a while back.
  16.  
  17.   Disclaimer:
  18.     Aint My Fault I didn't break it, and I didn't install it.
  19.     If it doesn't work I'll help but it should work, so have fun.
  20.  
  21.  
  22.   now to the mod.
  23.  
  24.  open BBSUTL.C and find void reqchat(void) and replace it with this one.
  25.  
  26. void reqchat(void)
  27. {
  28.   int ok;
  29.   char s[81], s1[81], s2[81],s3[81];
  30.  
  31.   nl();
  32.   nl();
  33.   ok=sysop2();
  34.   if (restrict_chat & thisuser.restrict)
  35.     ok=0;
  36.   if (ok) {
  37.     if (chatcall) {
  38.       chatcall=0;
  39.       pl("Chat request turned off.");
  40.       topscreen();
  41.     } else {
  42.         topscreen();
  43.           sprintf(s,"%sCHAT.VOC",syscfg.gfilesdir);
  44.            if (exist(s))
  45.                 {
  46.             outchr(12);
  47.             npr2("── SoundBlaster Chat ──");
  48.             npr2("── Non Abortable ──");
  49.             sprintf(s3,"vplay %schat.voc",syscfg.gfilesdir);
  50.            shrink_out(s3,1,0,1,1);
  51.           nl();
  52.             }  else  {
  53.  sound(284);delay(200);sound(568);delay(200);sound(426);delay(200);npr("1.");
  54.  sound(379);delay(200);sound(758);delay(200);sound(426);delay(200);npr("2.");
  55.  sound(716);delay(200);sound(426);delay(200);sound(284);delay(200);npr("3.");
  56.  sound(568);delay(200);sound(426);delay(200);sound(379);delay(200);npr("4.");
  57.  sound(758);delay(200);sound(426);delay(200);sound(716);delay(200);npr("5.");
  58.  sound(426);delay(200);sound(319);delay(200);sound(568);delay(200);npr("6.");
  59.  sound(426);delay(200);sound(379);delay(200);sound(758);delay(200);npr("7.");
  60.  sound(426);delay(200);sound(716);delay(200);sound(426);delay(200);npr("8.");
  61.  sound(319);delay(200);sound(568);delay(200);sound(426);delay(200);npr("9.");
  62.  sound(379);delay(200);sound(758);delay(200);sound(426);delay(200);npr("8.");
  63.  sound(716);delay(200);sound(426);delay(200);sound(379);delay(200);npr("7.");
  64.  sound(568);delay(200);sound(426);delay(200);sound(379);delay(200);npr("6.");
  65.  sound(758);delay(200);sound(426);delay(200);sound(716);delay(200);npr("5.");
  66.  sound(426);delay(200);sound(379);delay(200);sound(568);delay(200);npr("4.");
  67.  sound(426);delay(200);sound(379);delay(200);sound(758);delay(200);npr("3.");
  68.  sound(426);delay(200);sound(716);delay(200);sound(426);delay(200);npr("2.");
  69.  sound(284);delay(200);sound(568);delay(200);sound(426);delay(200);npr("1.");
  70.  sound(379);delay(200);sound(758);delay(200);sound(426);delay(200);npr("2.");
  71.  sound(716);delay(200);sound(426);delay(200);sound(284);delay(200);npr("3.");
  72.  sound(568);delay(200);sound(426);delay(200);sound(379);delay(200);npr("4.");
  73.  sound(758);delay(200);sound(426);delay(200);sound(716);delay(200);npr("5.");
  74.  sound(426);delay(200);npr("6.");     nosound();
  75.         nl();
  76.         }
  77.           chatcall=1;
  78.         pl("1Chat call turned ON.");
  79.         nl();
  80.     }
  81.   } else {
  82.     pl("6Sysop not available.");
  83.     nl();
  84.     prt(2,"Is this an emergency? ");
  85.     if (yn()) {
  86.         prt(1,"Emgergency Chat Password ");
  87.         mpl3(20);
  88.         inputl(s1,20);
  89.       if (strcmp(s1,"CHATPW")==0)  {
  90. /*        if (strcmp(s1,syscfg.chatpw)==0) {  */       //NOTE 1!
  91.           topscreen();
  92.           sprintf(s,"%sECHAT.VOC",syscfg.gfilesdir);
  93.            if (exist(s))
  94.                 {
  95.             npr2("── SoundBlaster Emergency Chat ──");
  96.             npr2("── Non Abortable ──");
  97.             sprintf(s3,"vplay %sechat.voc",syscfg.gfilesdir);
  98.            shrink_out(s3,1,0,1,1);
  99.           nl();
  100.             }  else  {
  101.  
  102.   sound(440);delay(549);sound(494);delay(163);
  103.   sound(523);delay(383);npr("1.");sound(440);delay(383);
  104.   nosound();delay(383);sound(440);delay(549);npr("2.");
  105.   sound(494);delay(163);sound(523);delay(383);sound(440);delay(383);npr("3.");
  106.   sound(622);delay(54);sound(659);delay(54);sound(622);delay(54);npr("4.");
  107.   sound(659);delay(54);sound(622);delay(54);sound(659);delay(54);npr("5.");
  108.   sound(622);delay(54);sound(659);delay(54);sound(622);delay(54);npr("6.");
  109.   sound(659);delay(54);sound(622);delay(54);sound(659);delay(54);npr("7.");
  110.   sound(622);delay(54);sound(659);delay(54);sound(622);delay(54);npr("8.");
  111.   sound(659);delay(54);sound(622);delay(54);sound(659);delay(54);npr("9.");
  112.   sound(622);delay(54);sound(659);delay(54);sound(622);delay(54);npr("8.");
  113.   sound(659);delay(54);sound(622);delay(54);sound(659);delay(54);npr("7.");
  114.   sound(622);delay(54);sound(659);delay(54);sound(622);delay(54);npr("6.");
  115.   sound(659);delay(54);sound(622);delay(54);sound(659);delay(54);npr("5.");
  116.   sound(622);delay(54);sound(659);delay(54);sound(622);delay(54);npr("4.");
  117.   sound(659);delay(54);sound(622);delay(54);sound(659);delay(54);npr("3.");
  118.   sound(622);delay(54);sound(659);delay(54);sound(622);delay(54);npr("2.");
  119.   nosound(); 
  120.       nl();
  121.         }
  122.              chatcall=1;
  123.           pl("1Chat request turned ON.");
  124.           nl();
  125.         } else {
  126.               sprintf(s2,"wrong chat PW %s",s);
  127.               sysoplog(s2);
  128.         }
  129.      }
  130.   }
  131. }
  132.  
  133.  
  134. ok. that's the mod, pretty simple and if you don't have a soundblaaster then 
  135. it'll pay G&R's Sweet Child of Mine,  and if they have the chat PW it plays
  136. another song, but I can't remember what it is.
  137.  
  138.  
  139. ok, I stole the songs out of a mod from a long time back so don't sue me,
  140. I just can't remember who wrote it.
  141.  
  142.  
  143. now, get a copy of VPLAY, (which should have come with the soundblaster)
  144. put it in the gfiles directory and find your favorite .voc and rename it
  145. to CHAT.VOC and get another .VOC and rename it to ECHAT.VOC and put that
  146. in your gfiles directory.
  147.  
  148. to change the chat password you need to recode it /* or type //CHATPW from 
  149. the main prompt.*/
  150.  
  151. /* NOTE 1 */
  152.  
  153.     ok. if you want to have a configurable chat PW from the main prompt
  154.  
  155. open VARDEC.H
  156.  
  157.    find this line
  158.  
  159.  
  160.         char           res[30];
  161. } configrec;
  162.  
  163.  
  164. and change it to this
  165.  
  166.         char           chatpw[11];    /* for chat password  */
  167.         char              res[19];
  168. } configrec;
  169.  
  170.  
  171. now open BBS.C   then in void mainmenu(void); find:
  172.  
  173.  
  174.     if (strcmp(s,"CHAINEDIT")==0) {
  175.       sysoplog(get_stringx(1,4));
  176.       chainedit();
  177.     }
  178.  
  179.  
  180. and add this right after that.
  181.  
  182.     if (strcmp(s,"CHATPW")==0) {
  183.         npr("The Current Chat Password is %s\r\n",syscfg.chatpw);
  184.         npr("Would you like to change it? ");
  185.         if (yn())
  186.           {
  187.             input(s,10);
  188.             strcpy(s,syscfg.chatpw);
  189.            }
  190.     }
  191.  
  192. and last but not least delete the line with the CHATPW in it and uncomment
  193. the line underneath it.
  194.